/**
  ******************************************************************************
  * @author     Chris
  * @since      2024/6/14 22:34
  *
  * @file       hd_led.h
  * @brief      Head file of LED Hardware Driver.
  *
  * @note       This file contains the hardware driver's function declaration
  *             for the LED.
  *
  * @warning    None.
  ******************************************************************************
  * Change Logs:
  *   Date           Author       Notes
  *   2024/6/14      Chris        the first version
  *
  ******************************************************************************
  */

#ifndef JXTECH_LED_H
#define JXTECH_LED_H

#include "stm32f407xx.h"
#include "pd_gpio.h"
#include "drivers.h"

typedef struct LEDDef LED;

struct LEDDef {
    GPIO *gpio;

    void (*init)(const LED *this);

    void (*on)(const LED *this);

    void (*off)(const LED *this);

    void (*turn)(const LED *this);

};

extern const struct LEDClass {
    LED *(*build)(GPIO *gpio);
} LEDBuilder;


#endif
